<template>
  <div class="child">
    <h3>Child</h3>
    <p>父组件的count值是{{count}}</p>
    <button @click="$emit('changeMe',1)">对count进行累加</button>
    <GrandSon v-bind="$attrs" v-on="$listeners"></GrandSon>
  </div>
</template>

<script>
import GrandSon from "./GrandSon"
export default {
    name:"Props",
    props:["count"],
    components:{
        GrandSon,
    },
    mounted() {
        console.log(this.$attrs);
        console.log(this.$listeners);
    },
}
</script>

<style scoped>
.child{
    background: pink;
}
</style>